$(function(){

    console.log("开始加载...");
    //初始化js
    if (window.addEventListener) {
        window.addEventListener("load", csh, false);
    } else if (window.attachEvent) {
        window.attachEvent("onload", csh);
    } else {
        window.onload = csh;
    }

});
function csh() {
    //设置语言
    setLanguage();
}


//设置语言
function setLanguage() {

    var languagesMap = {"en_us": "EN_US", "zh_cn": "ZH_CN", "zh_tw": "ZH_TW"};
    var languVal = $.MvcSheetUI.SheetInfo.Language;
    $.MvcSheetUI.SetControlValue("CHANGELANG", languagesMap[languVal]);
    if(!$.MvcSheetUI.GetControlValue("CHANGELANG")){
        $.MvcSheetUI.SetControlValue("CHANGELANG", languagesMap["zh_cn"]);
    }

}
